package com.refect;

import java.lang.reflect.Method;

/**
 * @author liuxiaoding
 * @data 2019/7/6
 */
public class ReflectCase {
    public static void main(String[] args) throws Exception {
        Proxy target = new Proxy();
        Method method = Proxy.class.getDeclaredMethod("run",String.class);
        method.invoke(target,"xxxx");
    }

    static class Proxy {
        public void run(String name) {
            System.out.println("run"+name);
        }
    }
}
